<template>
	<view class="review-item">
		<view class=" u-flex u-flex-between u-flex-items-center">
			<view class="u-flex u-flex-items-center">
				<up-avatar :size="28" :src="info.avatar" mode="aspectFill"></up-avatar>
				<view class=" f-w-b f-s-14 u-m-b-8 u-m-l-20">{{ info.nickName }}</view>
			</view>
			<view class="sub-title"> {{$u.timeFormat( info.createAt, 'yyyy-mm-dd')}}</view>
		</view>
		<view class="u-p-l-16 u-m-t-24 ">
			<u-rate :count="5" readonly :modelValue="info.rate" allowHalf :size="18" inactiveColor="#eeeeee"
				activeColor="#feb432"></u-rate>
			<view class="f-s-14 u-m-t-20 u-p-l-6" style="word-break: break-all;">{{ info.content }}</view>
			<!-- <view class="u-p-l-6 u-m-t-20" v-if="userId == info.userId">
				<u-icon name="more-dot-fill" color="#cccccc"></u-icon>
			</view> -->
			<block v-if="line">
				<view class="_line" />
			</block>

		</view>
	</view>
</template>

<script setup>
	import {
		defineProps
	} from 'vue';
	import store from '../store';
	const props = defineProps({
		info: Object,
		line: {
			type: Boolean,
			default: true
		}
	})
	const userId = store.getters.userId
</script>

<style lang="scss" scoped>
	.review-item {
		padding: 4px 8px 4px;
		margin-bottom: 15px;
	}

	._line {
		margin-top: 16px;
		border-bottom: 1rpx solid #eee;
	}
</style>